const panel = this.pageObj.getApiWidgetByAliasName('event-panel')?.widgetObj
const queryManage = this.pageObj.getApiWidgetByAliasName('queryManage')?.widgetObj
const type = this.pageObj.getVariables().find(v => v.name === 'panelType')?.value || 0
const searchText = ''
let process = ['currentWarnings', 'historicalWarnings', 'totalWarning'].indexOf($event)

console.log($event)
this.getApiPage().setVariables([{ name: 'whetherProcess', value: process }])

if (+type === 0) {
    queryManage.queryDrillNews(process, searchText).then(res => {
        panel.setData([{data: res}])
        panel.render()
    })
} else {
    queryManage.queryDrillGroup(type, process).then(res => {
        panel.setData([{data: res}])
        panel.render()
    })
}


